<template>
  <!-- 缺省页组件 -->
  <view class="default">
    <!-- 图片 -->
    <image class="default-image" :src="content.url" />
    <text class="default-text">{{ content.text }}</text>
    <button v-if="content.button.display" class="default-button" @click="create">{{ content.button.text }}</button>
  </view>
</template>
<script>
export default {
  props: {
    content: {
      type: Object,
      default: null
    }
  },
  methods: {
    create() {
      this.$emit('changeData')
    }
  }
}
</script>
<style>
.default {
  width: 750rpx;
  min-height: 100vh;
  background-color: #f0f2f5;
  border-top: 1rpx solid #d8d8d8;
}
.default-image {
  width: 360rpx;
  height: 360rpx;
  margin-left: 194rpx;
  margin-top: 240rpx;
}
.default-text {
  display: block;
  color: #9b9b9b;
  font-size: 32rpx;
  margin-top: 40rpx;
  text-align: center;
}
.default-button {
  padding: 0;
  margin: 0;
  border: 2rpx solid #306de9;
  width: 240rpx;
  height: 80rpx;
  margin-top: 80rpx;
  margin-left: 254rpx;
  font-size: 32rpx;
  color: #306de9;
  line-height: 80rpx;
  background-color: #F0F2F5;
}
</style>
